package com.wwt.server.controller;


import com.wwt.server.imp.MenuServiceImpl;
import com.wwt.server.pojo.Menu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Tao
 * @since 2021-12-05
 */
@Api(tags = "菜单控制器")
@RestController
@RequestMapping("/system/cfg")
public class MenuController {
    @Autowired
    private MenuServiceImpl menuService;

    @ApiOperation(value = "根据用户ID获取菜单")
    @GetMapping("/menu")
    public List<Menu> getMenuByAdminId() {

        return menuService.getMenuByAdminId();
    }

}
